package com.tianji.learning.controller;


import com.tianji.api.dto.leanring.LearningLessonDTO;
import com.tianji.learning.domain.dto.LearningRecordFormDTO;
import com.tianji.learning.domain.vo.SignResultVO;
import com.tianji.learning.service.ILearningRecordService;
import com.tianji.learning.service.ISignRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 学习记录表 前端控制器
 * </p>
 *
 * @author fx
 * @since 2024-08-22
 */
@Api(tags = "每日签到 相关接口")
@RestController
@RequestMapping("/sign-records")
@RequiredArgsConstructor
public class SignRecordController {
    private final ISignRecordService signService;

    /**
     * 01 用户签到 （day07-随堂-01）
     */
    @PostMapping
    @ApiOperation("用户签到")
    public SignResultVO addSignRecord() {
        return signService.addSignRecord();
    }


    /**
     * 02 查询当月签到记录 （day07-随堂-02）
     * @return
     */
    @GetMapping
    @ApiOperation("查询当月签到记录")
    public /*List<Byte>*/Byte[] getSignRecords() {
        return  signService.getSignRecords();
    }

}
